﻿namespace Sedodream.Web.Common.View
{
    using System;
    using System.Web;
    using System.Web.Mvc;

    public class ViewRequestContext : IViewRequestContext
    {
        private readonly HtmlHelper mHtmlHelper;

        public ViewRequestContext(HtmlHelper htmlHelper)
        {
            if (htmlHelper == null) { throw new ArgumentNullException("htmlHelper"); }

            mHtmlHelper = htmlHelper;
        }

        public HttpResponseBase HttpResponse
        {
            get
            {
                return HtmlHelper.ViewContext.HttpContext.Response;
            }
        }

        public HtmlHelper HtmlHelper
        {
            get
            {
                return mHtmlHelper;
            }
        }
    }
}
